package com.chendx.store.order.config;

import com.chendx.store.order.netty.OrderNettyServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by chendx on 2021/9/29.
 */
@Configuration
public class OrderNettyConfig {

    @Bean
    public OrderNettyServer createOrderNettyServer(){
        OrderNettyServer goodsNettyServer = new OrderNettyServer();

        new Thread(){
            @Override
            public void run(){
                goodsNettyServer.start(2345);
            }
        }.start();
        return goodsNettyServer;
    }
}
